/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/

#include "曲线轴.h"




static bool f_曲线视口页面鼠标滚轮(C_Widget* self, const S_鼠标& 鼠标) {
	C_关键帧视口页面* view = dynamic_cast<C_关键帧视口页面*>(self);

	float32 缩放量 = 1;
	if (鼠标.lZ > 0) {
		缩放量 = 1.3;
	}
	else if (鼠标.lZ < 0) {
		缩放量 = 0.7;
	}

	f_C_Widget_鼠标位置视口缩放(self, { 缩放量, 缩放量 });


	return true;
}



static void f_曲线视口布局(C_Widget* self, C_Widget** w, uint32 num) {
	C_关键帧视口页面* view = dynamic_cast<C_关键帧视口页面*>(self);

}


static void f_曲线视口绘制(C_Widget* self, S_2D画布* 画布) {
	C_关键帧视口页面* view = dynamic_cast<C_关键帧视口页面*>(self);


}

static void f_曲线视口变换(C_Widget* self) {
	C_关键帧视口页面* view = dynamic_cast<C_关键帧视口页面*>(self);


	return;
}


C_关键帧视口页面::C_关键帧视口页面(S_UI创建环境& ctx) {
	mf_布局Fun = f_曲线视口布局;
	mf_DrawFun = f_曲线视口绘制;
	mf_变换修改 = f_曲线视口变换;

	//mf_鼠标按键点击 = f_时间轴页面鼠标点击;
	//mf_鼠标按键按下 = f_时间轴页面鼠标按下;
	//mf_鼠标按键放开 = f_时间轴页面鼠标放开;
	//mf_鼠标移动 = f_时间轴页面鼠标位置改变;
	mf_鼠标滚轮 = f_曲线视口页面鼠标滚轮;
}

C_关键帧视口页面::~C_关键帧视口页面() {
}

void C_关键帧视口页面::f_刷新时间帧绘制() {

}


C_Widget* f_创建曲线视口页面(S_UI创建环境& ctx) {
	return nullptr;
}

void f_曲线视口_帧绘制更新(bool p) {

}






